home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinNT Old Startup.xpl < prev    next >
Text File  |  2004-03-01  |  2KB  |  69 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="1"
  3. "COUNT"="2"
  4. "UIPATH 1"="Startup/Shutdown\Startup\Windows 9x/ME\40) Pre-Windows"
  5. "UIPATH 2"="Startup/Shutdown\Startup\Windows NT/2K/XP\40) 16bit Programs"
  6. "UIPATH 3"="Virtual Paranoia\Hijacker Places"
  7. "NAME"="16bit Programs startup"
  8. "VERSION"="1.35"
  9. "LANGUAGE"="VBScript"
  10. "TEXT 1"="LOAD command"
  11. "TEXT 2"="RUN command"
  12. "TEXT 3"="win.ini LOAD"
  13. "TEXT 4"="win.ini RUN"
  14. "DESCRIPTION 1"="In Windows 3.x (Win 16bit) the only way to start a program automatically when Windows loads were the commands "RUN" and "LOAD" in WIN.INI. "
  15. "DESCRIPTION 2"="Although Windows now supports many other options to do the same, RUN and LOAD are still supported and some programs keep on using it."
  16. "DESCRIPTION 3"="To make the confusion complete, Windows supports these commands in BOTH registry and win.ini."
  17. "DESCRIPTION 4"="Note #1: Use only short file names (8+3), no spaces!"
  18. "DESCRIPTION 5"="Note #2: To execute two or more commands, separate the commands using a single space. The commands must be in the current PATH specified in your AUTOEXEC.BAT file."
  19. "AUTHOR"="Xteq Systems"
  20. "CONTACTURL"="http://www.xteq.com"
  21. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  22. "COMMENT 1"=" "
  23.  
  24.  
  25. sPath="HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\"
  26. sV1="LOAD"
  27. sV2="RUN"
  28.  
  29. sFile="WIN.INI"
  30. sFileSec="WINDOWS"
  31.  
  32. Sub Plugin_Initialize 
  33.  s=RegReadValue(sPath&sV1)
  34.  if len(s)=0 then s=INIReadValue(sFile,sFileSec,sV1)
  35.  Call SetUIElement(1,s)
  36.  
  37.  s=RegReadValue(sPath&sV2)
  38.  if len(s)=0 then s=INIReadValue(sFile,sFileSec,sV2)
  39.  Call SetUIElement(2,s)
  40. End Sub
  41.  
  42. Sub Plugin_CheckData(ElementIndex)
  43. End Sub
  44.  
  45. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  46.  s=GetUIElement(1)
  47.  Call RegWriteValue(sPath&sV1,s,1)
  48.  
  49.  s=GetUIElement(2)
  50.  Call RegWriteValue(sPath&sV2,s,1)
  51.  
  52.  
  53.  'Seems like unnecessary, but these commands ensure that the registry- and
  54.  'INI commands match...
  55.  
  56.  s=GetUIElement(1)
  57.  Call INIWriteValue(sFile,sFileSec,sV1,s)
  58.  
  59.  s=GetUIElement(2)
  60.  Call INIWriteValue(sFile,sFileSec,sV2,s)
  61.  
  62.  
  63.  
  64.  Call Restart
  65. End Sub
  66.  
  67. Sub Plugin_Terminate 
  68. End Sub
  69.